from virtual_system import System as RandomSystem, analysis, setConfig
from ray_system import RaySystem
from quantum_system_no_resource import QuantumSystemNoResource

# 可以考虑开个并行做实验
def testSystem(SystemClass, node_number):
    system = SystemClass()
    system.createNodes(node_number)
    for time_frame in system.time_frames:
        # print(type(SystemClass), time_frame)
        system.step()
        pass
    
    print('分析', type(system))
    analysis(system)
    pass


for node_num in range(4, 20):
    for create_time_ratio in range(1, 10):
        create_time_ratio *= 0.1
        for max_execution_time in range(3, 10):
            setConfig(create_time_ratio, max_execution_time)
            print(node_num, create_time_ratio, max_execution_time)
            testSystem(RandomSystem, node_num)
            testSystem(RaySystem, node_num)
            testSystem(QuantumSystemNoResource, node_num)